package InputOutputStreamDemo;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;

public class FileOutputStreamDemo {
    public static void main(String[] args) throws Exception {
        OutputStream os =
                new FileOutputStream("d:\\Demo-Java\\java-demo-hbnu\\src\\bb1.txt",true);
        byte[] bytes = "湖北师范大学".getBytes();
        os.write(bytes, 0, bytes.length);

        os.write("我爱你中国".getBytes());

        //换行符
        os.write("\r\n".getBytes());
    }
}
